package com.engine.jucailinkq.attendance.enums;

import com.finance.toolkit.BaseEnum;

/**
 * 核算单位
 */
public enum AccountingUnitEnum implements BaseEnum {
    DAY("0","天"),
    HOUR("1","小时"),
    MINUTES("2","分钟"),
    ONCE("3","次");
    AccountingUnitEnum(String key, String value){
        this.key=key;
        this.value=value;
    }
    private String key;
    private String value;

    @Override
    public String getKey() {
        return this.key;
    }

    @Override
    public String getValue() {
        return this.value;
    }
    public static AccountingUnitEnum getEnum(String hsdw){
        for (AccountingUnitEnum unitEnum :AccountingUnitEnum.values()){
            if (unitEnum.getKey().equals(hsdw)){
                return unitEnum;
            }
        }
        return null;
    }
}
